-- GENERATED SPELL FOR [Defias Pillager] --


function spell0_589(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20793,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_589', 3000, 1)
end

function spell1_589(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_589', 0, 1)
end

function Sorts_589(pUnit, Event)
local choix_sorts_589 = math.random(0, 1)
if choix_sorts_589 == 0 then
pUnit:RegisterEvent('spell0_589', 1, 1)
end
if choix_sorts_589 == 1 then
pUnit:RegisterEvent('spell1_589', 1, 1)
end
end

function mob589_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_589', math.random(1500, 3000), 1)
end

function mob589_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob589_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob589_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(589, 1, 'mob589_Action')
RegisterUnitEvent(589, 2, 'mob589_Leave')
RegisterUnitEvent(589, 3, 'mob589_Kill')
RegisterUnitEvent(589, 4, 'mob589_Die')
